import Mock from 'mockjs'
const Random = Mock.Random

// 创建图片数据
// post请求,带参数,参数会在data中返回,会返回url,type,body三个参数,可以把data打印出来看看
Mock.mock(/\/api\/image\/getImage/, 'post', (data) => {

  const info = JSON.parse(data.body)
  return {
    img: Random.image('200x100', '#4A7BF7', info.name),
    code: 200
  }
})